#ifndef TERMPREFS_H
#define TERMPREFS_H

#include <QtGui>
#include "serialconsole.h"

#define publisherKey            "Parallax,Inc."
#define publisherWebKey         "www.parallax.com"
#define appNameKey              "SideTerminal"

#define enableClearScreen       appNameKey "_enableClearScreen"
#define enableHomeCursor        appNameKey "_enableHomeCursor"
#define enablePosXYCursor       appNameKey "_enablePosXYCursor"
#define enableMoveCursorLeft    appNameKey "_enableMoveCursorLeft"
#define enableMoveCursorRight   appNameKey "_enableMoveCursorRight"
#define enableMoveCursorUp      appNameKey "_enableMoveCursorUp"
#define enableMoveCursorDown    appNameKey "_enableMoveCursorDown"
#define enableBeepSpeaker       appNameKey "_enableBeepSpeaker"
#define enableBackspace         appNameKey "_enableBackspace"
#define enableTab               appNameKey "_enableTab"
#define enableCReturn           appNameKey "_enableCReturn"
#define enableClearToEOL        appNameKey "_enableClearToEOL"
#define enableClearLinesBelow   appNameKey "_enableClearLinesBelow"
#define enableNewLine           appNameKey "_enableNewLine"
#define enablePosCursorX        appNameKey "_enablePosCursorX"
#define enablePosCursorY        appNameKey "_enablePosCursorY"
#define enableSwapNLCR          appNameKey "_enableSwapNLCR"

namespace Ui {
    class TermPrefs;
}

class TermPrefs : public QDialog
{
    Q_OBJECT
public:
    TermPrefs(SerialConsole *con);
    virtual ~TermPrefs();
    void clearAll();
    void saveSettings();
    void readSettings();

    void showDialog();

public slots:
    void accept();
    void reject();

private:
    Ui::TermPrefs *ui;
    SerialConsole  *serialConsole;
    QSettings      *settings;
    QStringList     settingNames;
};

#endif // TERMPREFS_H
